package com.lz.exception;

import com.lz.enums.ResultEnum;
import lombok.Getter;

/**
 * 自定义异常
 * Created by lz on 2018/8/17.
 */
@Getter
public class SellException extends RuntimeException {

    private Integer code;

    public SellException(ResultEnum resultEnum){
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }

    public SellException(Integer code,String msg){
        super(msg);
        this.code = code;
    }
}
